<?php

namespace App\Requests;

use Framework\BaseRequest;

/**
 * @method version_id
 * @method brand
 */
class AppOpenRequest extends BaseRequest
{
    public function authorize(): bool
    {
        $v = $this->input('v');
        if ($v < 0 || $v > 100) {
            $this->retError('v的范围不对');
        }

        return true;
    }

    public function rules()
    {
        return [
            'version_id' => 'required',
            'brand' => '',
        ];
    }
}
